package com.net.oil.user.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.user.contract.SetContract;
import com.net.oil.user.model.SetModel;

/**
 * 作者：lch
 * 时间：2018/3/31:16:16
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class SetPresenter extends BasePresenter<SetContract.View> implements SetContract.Presenter {

    private SetContract.View view;
    private SetContract.Model model;

    public SetPresenter(SetContract.View view) {
        this.view = view;
        this.model = new SetModel(this);
    }

    @Override
    public void logout() {
        model.logout();
    }

    @Override
    public void logoutSuccess() {
        view.logoutSuccess();
    }

    @Override
    public void logoutFailed() {
        view.logoutFailed();
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }
}
